
class Config:
	# 调试模式
	APP_DEBUG: bool = True

	# 项目信息
	PRO_TITLE = "Api"
	PRO_SUMMARY = 'For Test'
	PRO_VERSION: str = "0.0.1"
	PRO_DESC: str = "Project Test"

	# 跨越请求
	CORS_ORIGINS: list[str] = ["*"]
	CORS_ALLOW_CREDENTIALS: bool = True
	CORS_ALLOW_METHODS: list[str] = ["*"]
	CORS_ALLOW_HEADERS: list[str] = ["*"]
	
	# 数据库信息
	DATABASE_HOST = "127.0.0.1"
	DATABASE_PORT = "3306"
	DATABASE_DB = "itest"
	DATABASE_MYSQL_ROOT = "root"
	DATABASE_MYSQL_PWD = "123456"
	
	DATABASE_MYSQL_URL = f"mysql+pymysql://{DATABASE_MYSQL_ROOT}:{DATABASE_MYSQL_PWD}@{DATABASE_HOST}:{DATABASE_PORT}/{DATABASE_DB}?charset=utf8"
	DATABASE_SQLITE_URL = f"sqlite:///./{DATABASE_DB}.db"
	ECHO_SQL = False

	# 服务信息
	SERVER_HOST = '127.0.0.1'
	SERVER_PORT = 8080
	SERVER_RELOAD = True

	# 文件上传目录
	UPLOAD_PATH_WIN = "D:/upload"
	UPLOAD_PATH_DRA = "~/Download"

SETTINGS = Config()
